// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import router from './router'
import axios from 'axios'
import VueAxios from 'vue-axios'

import ElementUI from 'element-ui';

import 'element-ui/lib/theme-chalk/index.css';

Vue.use(ElementUI);

Vue.config.productionTip = false

Vue.use(VueAxios, axios)

/* eslint-disable no-new */

// axios.get('/renda/appclient/index.do', {
//         params: {
//             ID: 12345
//         }
//     })
//     .then(function(response) {
//         console.log(response);
//     })
//     .catch(function(error) {
//         console.log(error);
//     });

// Vue.axios.get('/renda/appclient/index.do', {
//         params: {
//             invoke: 'getCategory'
//         }
//     })
//     .then((response) => {
//         console.log(response.data)
//     })
var templateStr = '<App sd="sd" />'

var vm = new Vue({
    el: '#app',
    router,
    // data: function() {
    //     return {
    //         groceryList: [
    //             { id: 0, text: '蔬菜' },
    //             { id: 1, text: '奶酪' },
    //             { id: 2, text: '随便其它什么人吃的东西' }
    //         ],
    //         sd: "sd",
    //         object: {
    //             firstName: 'John',
    //             lastName: 'Doe',
    //             age: 30
    //         }
    //     }
    // },
    data: {
        groceryList: [
            { id: 0, text: '蔬菜' },
            { id: 1, text: '奶酪' },
            { id: 2, text: '随便其它什么人吃的东西' }
        ],
        sd: "sd",
        object: {
            firstName: 'John',
            lastName: 'Doe',
            age: 30
        }
    },
    components: {
        App
    },
    template: '<App/>'
})